<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/templates/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewInvoiceTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewInvoiceLabel_id}"/>
                    <h:outputText value="#{invoiceController.selected.id}" title="#{bundle.ViewInvoiceTitle_id}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_amount}"/>
                    <h:outputText value="#{invoiceController.selected.amount}" title="#{bundle.ViewInvoiceTitle_amount}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_dateOfIssue}"/>
                    <h:outputText value="#{invoiceController.selected.dateOfIssue}" title="#{bundle.ViewInvoiceTitle_dateOfIssue}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_dateOfSale}"/>
                    <h:outputText value="#{invoiceController.selected.dateOfSale}" title="#{bundle.ViewInvoiceTitle_dateOfSale}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_termOfPayment}"/>
                    <h:outputText value="#{invoiceController.selected.termOfPayment}" title="#{bundle.ViewInvoiceTitle_termOfPayment}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_wayOfPayment}"/>
                    <h:outputText value="#{invoiceController.selected.wayOfPayment}" title="#{bundle.ViewInvoiceTitle_wayOfPayment}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_totalNetPrice}"/>
                    <h:outputText value="#{invoiceController.selected.totalNetPrice}" title="#{bundle.ViewInvoiceTitle_totalNetPrice}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_status}"/>
                    <h:outputText value="#{invoiceController.selected.status}" title="#{bundle.ViewInvoiceTitle_status}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_totalGross}"/>
                    <h:outputText value="#{invoiceController.selected.totalGross}" title="#{bundle.ViewInvoiceTitle_totalGross}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_number}"/>
                    <h:outputText value="#{invoiceController.selected.number}" title="#{bundle.ViewInvoiceTitle_number}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_type}"/>
                    <h:outputText value="#{invoiceController.selected.type}" title="#{bundle.ViewInvoiceTitle_type}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_comments}"/>
                    <h:outputText value="#{invoiceController.selected.comments}" title="#{bundle.ViewInvoiceTitle_comments}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_totalVat}"/>
                    <h:outputText value="#{invoiceController.selected.totalVat}" title="#{bundle.ViewInvoiceTitle_totalVat}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_user}"/>
                    <h:outputText value="#{invoiceController.selected.user}" title="#{bundle.ViewInvoiceTitle_user}"/>
                    <h:outputText value="#{bundle.ViewInvoiceLabel_customer}"/>
                    <h:outputText value="#{invoiceController.selected.customer}" title="#{bundle.ViewInvoiceTitle_customer}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{invoiceController.destroyAndView}" value="#{bundle.ViewInvoiceDestroyLink}"/>
                <br />
                <br />
                <h:link outcome="Edit" value="#{bundle.ViewInvoiceEditLink}"/>
                <br />
                <h:commandLink action="#{invoiceController.prepareCreate}" value="#{bundle.ViewInvoiceCreateLink}" />
                <br />
                <h:commandLink action="#{invoiceController.prepareList}" value="#{bundle.ViewInvoiceShowAllLink}"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.ViewInvoiceIndexLink}"/>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
